﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Examination.Utils
{
    public static class ArrayHelper
    {
        public static int[] RandomArray(int min = 0, int max = 3)
        {
            List<int> ns = new List<int>();
            for (int i = min; i <= max; i++)
            {
                ns.Add(i);
            }
            Random random = new Random();
            int r , tmp;
            for (int i = min; i <= max; i++)
            {
                r = random.Next(1, ns.Count);
                tmp = ns[0];
                ns[0] = ns[r];
                ns[r] = tmp;
            }
            return ns.ToArray();
        }
    }
}
